<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理系统</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
    <link href="{{ url_for('static', filename='css/all.min.css') }}" rel="stylesheet">
</head>
<body class="main-body">
<div class="app-container">
    <!-- 顶部展示区 -->
    <header class="top-header">
        <div class="header-left">
            <h1 class="system-name">管理系统</h1>
        </div>
        <div class="header-right">

            <div class="user-info">
                <span class="user-name" id="currentUser">{{ real_name }}</span>
                <div class="user-avatar">
                    <i class="fa fa-user-circle"></i>
                </div>
            </div>
            <a href="{{ url_for('admin_login.logout') }}" id="logoutBtn" class="logout-btn">
                <i class="fa fa-sign-out-alt"></i>退出登录
            </a>

        </div>
    </header>

    <!-- 主内容区 -->
    <div class="main-content-container">
        <!-- 侧边栏导航 -->
        <aside class="sidebar">
            <nav class="sidebar-nav">
                <ul class="nav-list">
                    <li class="nav-item has-submenu">
                        <a href="#" class="nav-link">
                            <i class="fa fa-photo-video"></i>
                            <span class="nav-text">素材库</span>
                            <i class="fa fa fa-angle-down submenu-toggle"></i>
                        </a>
                        <ul class="submenu">
                            <li><a href="{{ url_for('image_library.page') }}" class="submenu-link"
                                   data-target="content-frame">图片素材库</a>
                            </li>
                            <li><a href="#" class="submenu-link">视频素材库</a></li>
                        </ul>
                    </li>

                    <li class="nav-item has-submenu">
                        <a href="#" class="nav-link">
                            <i class="fa fa-cog"></i>
                            <span class="nav-text">系统设置</span>
                            <i class="fa fa fa-angle-down submenu-toggle"></i>
                        </a>
                        <ul class="submenu">
                            <li><a href="{{ url_for('system_admin.page') }}" class="submenu-link"
                                   data-target="content-frame">管理员</a>
                            </li>
                            <li><a href="{{ url_for('system_log.page') }}" class="submenu-link"
                                   data-target="content-frame">系统日志</a></li>
                        </ul>
                    </li>
                </ul>
            </nav>
        </aside>

        <!-- 内容展示区（使用iframe加载独立HTML） -->
        <main class="content-area">
            <iframe id="content-frame" src="{{ iframe_page }}" frameborder="0" width="100%" height="100%"></iframe>
        </main>
    </div>
</div>

<script src="{{ url_for('static', filename='js/main.js') }}"></script>
<script>
    // 主框架页面特定脚本
    document.addEventListener('DOMContentLoaded', function () {
        // 导航菜单展开/收缩功能
        initSidebarNavigation();
    });
</script>
</body>
</html>